package com.itheima.edu.info.manger.contrller;

import com.itheima.edu.info.manger.domain.Student;
import com.itheima.edu.info.manger.service.StudentService;

import java.util.Scanner;

public class StudentContrller extends BaseStudentContrller {
    private Scanner sc = new Scanner(System.in);

    @Override
    public Student studentinfo(String id) {
        System.out.println("请输入学生姓名");
        String name = sc.next();
        System.out.println("请输入学生年龄");
        String age = sc.next();
        System.out.println("请输入学生地址");
        String address = sc.next();
        //2.将获取的信息封装为学生对象
        Student stu = new Student();
        //3.封装对象
        stu.setId(id);
        stu.setName(name);
        stu.setAge(age);
        stu.setAddress(address);
        return stu;
    }
}